home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 January / enter-2004-01.iso / files / maxima-5.9.0.exe / {app} / share / maxima / 5.9.0 / src / maxima-package.lisp < prev    next >
Encoding:
Text File  |  2003-02-09  |  4.7 KB  |  154 lines

  1. ;; SI is used for the regex info implementation. This line should be removed
  2. ;; when the info regex implementation no longer requires SI in all lisps.
  3. ;; jfa 12/12/2001
  4. (or (find-package "SI") (make-package "SI" :use '(COMMON-LISP)))
  5. (or (find-package "SLOOP") (make-package "SLOOP" :use '(LISP)))
  6.  
  7.  
  8. (in-package "SLOOP" )
  9. (shadow '(LOOP-FINISH) (find-package "SLOOP"))
  10.  
  11.  
  12. (or (find-package "MAXIMA")
  13.     (make-package  "MAXIMA"
  14.     :nicknames '("CL-MACSYMA"  "CL-MAXIMA" "MACSYMA")
  15.     :use `("LISP" #+clisp ,@(if (find-package "EXT") '("EXT")))  ))
  16.  
  17. (shadowing-import '(sloop::loop-return sloop::local-finish sloop::loop-finish sloop::sloop) "MAXIMA")
  18.  
  19. (shadow '(complement continue   tan sinh cosh tanh #+ti file-position ) 'cl-maxima)
  20.  
  21.  
  22. ;;defined in polyrz
  23. (shadow '(signum ) 'cl-maxima)
  24.  
  25. ;;lmsup
  26. #+lispm
  27. (shadow '(namestring) 'cl-maxima)
  28.  
  29. ;;in transs
  30.  
  31.  
  32. #+lispm
  33. (import '(global::array-leader
  34.       si::arglist
  35.       global::gc-on
  36.       global::gc-off
  37.       global::user-id
  38.       global::ERROR-RESTART-LOOP
  39.       global::condition-case 
  40.       global::compile-flavor-methods
  41.       global::default-cons-area
  42.       global::errset
  43.       global::make-condition
  44.       si::signal-condition
  45.       si::set-in-instance
  46.       si::record-source-file-name
  47.       #+ti tv::define-user-option-alist
  48.       #+ti tv::font-char-height ;for plot win
  49.       #+ti tv::font-char-width ;for plot win
  50.       #-ti       global::define-user-option-alist
  51.       #-symbolics global::defflavor
  52.       #-symbolics global::defmethod
  53.       #-symbolics global::defun-method
  54.       global::self
  55.       global::send
  56.       global::print-herald
  57.       global::without-interrupts
  58.       global::current-process
  59.       global::working-storage-area
  60.       ) 'cl-maxima)
  61.  
  62. (shadow '(copy xor putprop) 'cl-maxima)
  63. (shadow '(
  64.  ARRAY       ;;"CL-MAXIMA-SOURCE: MAXIMA; COMMAC" ;not a function in common lisp but symbol in the package
  65.  EXP         ;;various files declare this special which is bad since it is in LISP package.
  66.  LET         ;;"CL-MAXIMA-SOURCE: MAXIMA; LET" ;;like let*
  67.  LET*        ;;"CL-MAXIMA-SOURCE: MAXIMA; LET" ;;maxima:let* does destructuring.  
  68.  LISTEN      ;;"CL-MAXIMA-SOURCE: MAXIMA; SUPRV" ;;has trivial definition in suprv (listen any) ==> 0
  69.  SIGNUM      ;;"CL-MAXIMA-SOURCE: MAXIMA; COMMAC" ;same except (cl:signum 1.3)==1.0 not 1 but I think this is ok for macsyma
  70.  ATAN        ;; (zl:atan y x) == (cl:atan y x) + 2 pi if latter is  negative
  71.  ASIN        ;; different for complex numbers
  72.  ACOS 
  73.  ASINH             
  74.  ACOSH
  75.  ATANH
  76.  TANH        ;;"CL-MAXIMA-SOURCE: MAXIMA; TRIGI" ;same could remove from trigi
  77.  COSH        ;;"CL-MAXIMA-SOURCE: MAXIMA; TRIGI" ;same  ditto
  78.  SINH        ;;"CL-MAXIMA-SOURCE: MAXIMA; TRIGI" ;same  ditto
  79.  TAN         ;;"CL-MAXIMA-SOURCE: MAXIMA; TRIGI" ;;same ditto
  80.  ) 'cl-maxima)
  81.  
  82. ;;new definitions in commac to handle narg compat.
  83. (shadow '(arg listify setarg) 'cl-maxima)
  84.  
  85. ;;MANY instances are (if a b &rest c).  I changed a bunch but there were 
  86. ;;many more
  87. (shadow 'lisp::IF 'cl-MAXIMA)
  88.  
  89. #+kcl
  90. (import '(si::modulus si::cmod si::ctimes si::cdifference si::cplus)
  91.    'cl-maxima)
  92.  
  93. #+(or clisp gcl)
  94. (import '(system::getenv) (find-package "MAXIMA"))
  95. #+gcl
  96. (import '(si::getpid) (find-package "MAXIMA"))
  97.  
  98. ;;get
  99. #+gcl
  100. (import '( si::cleanup si::*info-paths*
  101.        si::get-instream  si::short-name  si::cleanup
  102.        si::instream-stream-name si::instream-line si::instream-name
  103.        si::instream-stream
  104.        si::stream-name si::complete-prop
  105.        si::*stream-alist*
  106.        si::break-call
  107. ) "MAXIMA")
  108. #+gcl
  109. (setf (symbol-function 'maxima::newline) (symbol-function 'si::newline))
  110.  
  111. ;; *info-paths* from cl-info.lisp
  112. #+(or clisp cmu)
  113. (import '( si::*info-paths* ) "MAXIMA" )
  114.  
  115. ;; detect which version of clisp REGEXP we have
  116. #+clisp
  117. (if (find-package "REGEXP") 
  118.   (push (cond ((apply (intern "REGEXP-EXEC" "REGEXP") 
  119.                       (list (apply (intern "REGEXP-COMPILE" "REGEXP")
  120.                            '("AAA" t)) 
  121.                     "aaa"))
  122.                   ':case-fold-search     )
  123.               (t  ':case-fold-search-not ))
  124.     *features* ))
  125.           
  126. ;;redefined in commac  lucid 2.1 does (functionp 'jiljay)-->t
  127. (if (lisp::functionp 'dotimes) (push :shadow-functionp *features*))
  128. (unless (lisp::functionp 'lisp::functionp)
  129.    (pushnew :shadow-functionp *features*))
  130.  
  131. #+shadow-functionp
  132. (shadow 'lisp::functionp 'cl-maxima)
  133.  
  134. ;;;REMOVE The following two forms when the kcl reader can read
  135. ;;;the most-negative-double-float again.
  136. #+kcl ;bug fix for float not readable:
  137. (progn
  138. (shadow '( most-positive-single-float most-negative-double-float) 'cl-maxima))
  139. #+kcl 
  140. (progn ;bug fix for float not readable:
  141.  (defvar maxima::most-positive-single-float
  142.    (* .1 lisp::most-positive-single-float))
  143.  (defvar maxima::most-negative-double-float
  144.    (* .1 lisp::most-negative-double-float)))
  145.  
  146. #+(or gcl kcl)
  147. (in-package "SERROR"  :use '( "LISP" "SLOOP"))
  148.  
  149. (shadow 'lisp::float 'maxima)
  150. #+lispm
  151. (shadow 'lisp::loop 'maxima)
  152. (provide "MAXIMA")
  153.  
  154.